<template>
  <div class="warning-detail-pop">
    <div class="warning-detail-pop-title">
      <span>告警信息</span>
      <img src="../../../../../assets/images/situational-awareness/warning-icon.png" alt="" srcset="" />
    </div>
    <div class="warning-detail-pop-top">
      <img src="" alt="" srcset="" class="img1" />
      <div class="warning-detail-pop-top-center">
        <div>92.62%</div>
        <div>相识度</div>
        <div>
          <screen-line-progress width="100%" :height="6" :percent="82.62" bg-color="#060F41" active-color="linear-gradient(to right, #007AEC, #53FDFF)" borderRadius="4px"> </screen-line-progress>
        </div>
      </div>
      <img src="" alt="" srcset="" class="img2" />
    </div>
    <div class="warning-detail-pop-content">
      <div class="warning-detail-pop-content-item" v-for="(item, index) in warningDetailPop" :key="index">
        <span>{{ item.label }}</span>
        <span>{{ item.value }}</span>
        <img :src="item.icon" alt="" srcset="" v-if="item.icon" class="icon" />
      </div>
    </div>
    <div class="warning-detail-pop-bottom">
      <div>人员档案</div>
      <div id="animation-button">轨迹分析</div>
      <div @click="onVisibleSitePop">站点详情</div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue, Prop, Emit } from 'vue-property-decorator'
@Component({
  name: 'warning-detail-pop'
})
export default class WarningDetailPop extends Vue {
  @Prop({
    default: () => [
      {
        label: '姓名：',
        value: '王建军'
      },
      {
        label: '身份证号：',
        value: '37152217769876'
      },
      {
        label: '告警类别：',
        value: '涉毒重点人员'
      },
      {
        label: '告警时间：',
        value: '2021-7-03 17:19:00'
      },
      {
        label: '识别设备：',
        value: '621路北宅路上行-站点监控1'
      }
    ]
  })
  private warningDetailPop!: any[]

  @Emit()
  private onVisibleSitePop() {}
}
</script>

<style lang="scss" scoped>
.warning-detail-pop {
  box-sizing: border-box;
  width: 360px;
  height: 418px;
  background: url('../../../../../assets/images/situational-awareness/warning-pop-bac.png') no-repeat center;
  padding: 33px 22px 60px 37px;
  font-family: 'PingFang Regular';
  text-align: left;
  &-title {
    font-size: 20px;
    font-weight: bold;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    img {
      width: 46px;
      height: 44px;
    }
  }
  &-top {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-right: 10px;
    &-center {
      box-sizing: border-box;
      display: flex;
      align-items: center;
      flex-direction: column;
      width: calc(100% - 180px);
      height: 100%;
      padding: 0px 20px 0 24px;
      div:nth-child(1) {
        font-weight: bold;
        font-size: 22px;
        color: #ffc119;
      }
      div:nth-child(2) {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.76);
        padding-bottom: 10px;
      }
      div:nth-child(3) {
        box-sizing: border-box;
        padding-left: 5px;
        // border: 1px solid yellow;
        width: 100%;
        height: 10px;
      }
    }
    img {
      width: 90px;
      height: 90px;
      object-fit: cover;
    }
  }
  &-content {
    margin-top: 20px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    &-item {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      width: 100%;
      height: 28px;
      position: relative;
      padding-left: 20px;
      &::after {
        content: '';
        display: block;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #0c81fe;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translate(0, -50%);
      }
      .icon {
        width: 16px;
        height: 16px;
        padding-left: 5px;
      }
    }
  }
  &-bottom {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-size: 14px;
    margin-top: 10px;
    padding: 0 5px;
    div:nth-child(1) {
      box-sizing: border-box;
      width: 70px;
      height: 24px;
      line-height: 24px;
      color: #36baff;
      border: 1px solid #3790ff;
      border-radius: 12px;
      text-align: center;
    }
    div:nth-child(2) {
      box-sizing: border-box;
      width: 70px;
      height: 24px;
      line-height: 24px;
      color: #00cf1d;
      border: 1px solid #00cf1d;
      border-radius: 12px;
      text-align: center;
    }
    div:nth-child(3) {
      box-sizing: border-box;
      width: 70px;
      height: 24px;
      line-height: 24px;
      color: #fffc02;
      border: 1px solid #efdb00;
      border-radius: 12px;
      text-align: center;
    }
  }
}
</style>
